3.9.17 \(\int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx\) [817]

Optimal. Leaf size=171 \[ -\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac {d n \cos (e+f x) (d \csc (e+f x))^{-1+n} \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\sin ^2(e+f x)\right )}{a f (1-n) \sqrt {\cos ^2(e+f x)}}+\frac {\cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\sin ^2(e+f x)\right )}{a f \sqrt {\cos ^2(e+f x)}} \]

[Out]

-cot(f*x+e)*(d*csc(f*x+e))^n/f/(a+a*csc(f*x+e))+d*n*cos(f*x+e)*(d*csc(f*x+e))^(-1+n)*hypergeom([1/2, 1/2-1/2*n
],[3/2-1/2*n],sin(f*x+e)^2)/a/f/(1-n)/(cos(f*x+e)^2)^(1/2)+cos(f*x+e)*(d*csc(f*x+e))^n*hypergeom([1/2, -1/2*n]
,[1-1/2*n],sin(f*x+e)^2)/a/f/(cos(f*x+e)^2)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.16, antiderivative size = 171, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3317, 3905, 3872, 3857, 2722} \begin {gather*} \frac {d n \cos (e+f x) (d \csc (e+f x))^{n-1} \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\sin ^2(e+f x)\right )}{a f (1-n) \sqrt {\cos ^2(e+f x)}}+\frac {\cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\sin ^2(e+f x)\right )}{a f \sqrt {\cos ^2(e+f x)}}-\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a \csc (e+f x)+a)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x]),x]

[Out]

-((Cot[e + f*x]*(d*Csc[e + f*x])^n)/(f*(a + a*Csc[e + f*x]))) + (d*n*Cos[e + f*x]*(d*Csc[e + f*x])^(-1 + n)*Hy
pergeometric2F1[1/2, (1 - n)/2, (3 - n)/2, Sin[e + f*x]^2])/(a*f*(1 - n)*Sqrt[Cos[e + f*x]^2]) + (Cos[e + f*x]
*(d*Csc[e + f*x])^n*Hypergeometric2F1[1/2, -1/2*n, (2 - n)/2, Sin[e + f*x]^2])/(a*f*Sqrt[Cos[e + f*x]^2])

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3317

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^(n_.))^(p_.), x_Symbol] :> Dist
[d^(n*p), Int[(d*Csc[e + f*x])^(m - n*p)*(b + a*Csc[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x
] &&  !IntegerQ[m] && IntegersQ[n, p]

Rule 3857

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3905

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[(-b)*d*Cot[
e + f*x]*((d*Csc[e + f*x])^(n - 1)/(a*f*(a + b*Csc[e + f*x]))), x] + Dist[d*((n - 1)/(a*b)), Int[(d*Csc[e + f*
x])^(n - 1)*(a - b*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx &=\frac {\int \frac {(d \csc (e+f x))^{1+n}}{a+a \csc (e+f x)} \, dx}{d}\\ &=-\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac {n \int (d \csc (e+f x))^n (a-a \csc (e+f x)) \, dx}{a^2}\\ &=-\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac {n \int (d \csc (e+f x))^n \, dx}{a}-\frac {n \int (d \csc (e+f x))^{1+n} \, dx}{a d}\\ &=-\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac {\left (n (d \csc (e+f x))^n \left (\frac {\sin (e+f x)}{d}\right )^n\right ) \int \left (\frac {\sin (e+f x)}{d}\right )^{-n} \, dx}{a}-\frac {\left (n (d \csc (e+f x))^n \left (\frac {\sin (e+f x)}{d}\right )^n\right ) \int \left (\frac {\sin (e+f x)}{d}\right )^{-1-n} \, dx}{a d}\\ &=-\frac {\cot (e+f x) (d \csc (e+f x))^n}{f (a+a \csc (e+f x))}+\frac {\cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac {1}{2},-\frac {n}{2};\frac {2-n}{2};\sin ^2(e+f x)\right )}{a f \sqrt {\cos ^2(e+f x)}}+\frac {n \cos (e+f x) (d \csc (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {1-n}{2};\frac {3-n}{2};\sin ^2(e+f x)\right ) \sin (e+f x)}{a f (1-n) \sqrt {\cos ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 1.37, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(d \csc (e+f x))^n}{a+a \sin (e+f x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x]),x]

[Out]

Integrate[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x]), x]

________________________________________________________________________________________

Maple [F]
time = 0.15, size = 0, normalized size = 0.00 \[\int \frac {\left (d \csc \left (f x +e \right )\right )^{n}}{a +a \sin \left (f x +e \right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x)

[Out]

int((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x, algorithm="maxima")

[Out]

integrate((d*csc(f*x + e))^n/(a*sin(f*x + e) + a), x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x, algorithm="fricas")

[Out]

integral((d*csc(f*x + e))^n/(a*sin(f*x + e) + a), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (d \csc {\left (e + f x \right )}\right )^{n}}{\sin {\left (e + f x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*csc(f*x+e))**n/(a+a*sin(f*x+e)),x)

[Out]

Integral((d*csc(e + f*x))**n/(sin(e + f*x) + 1), x)/a

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e)),x, algorithm="giac")

[Out]

integrate((d*csc(f*x + e))^n/(a*sin(f*x + e) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (\frac {d}{\sin \left (e+f\,x\right )}\right )}^n}{a+a\,\sin \left (e+f\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d/sin(e + f*x))^n/(a + a*sin(e + f*x)),x)

[Out]

int((d/sin(e + f*x))^n/(a + a*sin(e + f*x)), x)

________________________________________________________________________________________